package com.wy.utils;

public enum StatusCode {

    SUCCESS(20000,"操作成功！"),
    ERROR(20001,"操作失败！"),
    LOGINERROR(20002,"用户名或密码错误！"),
    ACCESSERROR(20003,"权限不足！"),
    REMOTEERROR(20004,"远程调用失败！"),
    REPERROR(20005,"重复操作！"),
    UNAUTHENTICATED(20006,"此操作需要登陆系统！"),
    LOGINNULL(20007,"用户名不能为空！"),
    LOGINREPEAT(20008,"用户名已经存在！"),

    //第三方登录
    ACCESSTOKENERR(21001,"AccessToken获取失败！"),
    OPENTIDERR(21002,"OpenId获取失败！"),
    JWTTOKENEXPIRE(21004,"token过期！"),
    CODEISNULL(21005,"code不能为空"),
    ERRORDECRYPT(21007,"解密失败"),


    SERVER_ERROR(99999,"抱歉，系统繁忙，请稍后重试！");
    //操作代码
    public int code;

    //操作是否成功
    public String errmsg;

    private StatusCode(int code, String errmsg){
        this.code = code;
        this.errmsg = errmsg;
    }
}
